package com.onlinevideo.util;


import com.onlinevideo.data.MyConst;

import java.util.Random;

public class VCodeUtils {
    private static final Random random = new Random();

    public static String getVCode(int length){
        StringBuilder stringBuffer = new StringBuilder();
        for (int i = 0; i < length; i++) {
            stringBuffer.append(MyConst.CHARS.charAt(random.nextInt(MyConst.CHARS.length())));
        }
        return stringBuffer.toString();
    }

}
